 <!-- common -->
<script src="__PUBLIC__/Wap/lib/jquery-3.2.1.min.js"></script>
<script src="__PUBLIC__/Wap/lib/fastclick.js"></script>
<script src="__PUBLIC__/Wap/lib/swiper.min.js"></script>
<script src="__PUBLIC__/Wap/lib/jquery-weui.js"></script>
<script src="__PUBLIC__/Wap/lib/layer.js"></script>
<script>
	(function (global) {
		$(function() {
            FastClick.attach(document.body);
        });
		global.setTabbarActive = function (index) {
			// $ele.addClass("weui-bar__item--on");
			$($(".weui-tabbar a")[index]).addClass("weui-bar__item--on");
			if (index == 1) {
				$(".weui-tabbar__icon img").attr("src", "__PUBLIC__/static/images/jx_yueche_active.png")
			}
		}
		global.base_url = "/index.php?s=/";

		global.temp2time = function (temp_str) {
			return new Date(parseInt(temp_str) * 1000)
		}
		global.getUrlParamValue = function (name) { 
	        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
	        var r = window.location.search.substr(1).match(reg); 
	        if (r != null) return unescape(r[2]); 
	        return null; 
	    } 
	    global.verifyTelNum = function (telnum) {
	    	var reg_str = /^1[34578]\d{9}$/; 
			return reg_str.test(telnum);
	    }
	    
	    global.loadmoreScroll = function (fn) {
	        global.is_end = true;
	        $(window).scroll(function () {
	            var btHeight = $(document).height() - $(this).scrollTop() - $(this).height();
	            if ( btHeight < 60) {
	            	
	                if (is_end) {
	                    fn();
	                    is_end = false;	                                      
	                }
	                
	                
	            }else {
	                
	            }
	        })
    	};
    	global.page_size = 7;
	})(window)
</script>